<%include file="include/head.html"%>
<div class="wrapper">
  <div id="div-home" class="main-info-box">
    <%include file="include/crumbs.html"%>
    <%include file="include/edit_nav.html"%>
    <div class="div-info-body">
      <%if $history|@count gt 0%>
      <table>
	<th class="version">版本
	</th>
	<th class="name">姓名
	</th>
	<th class="gender">性别
	</th>
	<th class="birth">出生日期
	</th>
	<th class="region">地区
	</th>
	<th class="author">贡献者
	</th>
	<th class="date">编辑时间
	</th>
	<th>
	  操作
	</th>
	<% foreach name=history from=$history item=info %>
	<tr>
	  <td><%$info.id%>
	  </td>
	  <td><%$info.content.realname%>
	  </td>
	  <td><%if $info.content.gender eq $MALE%>男<%else%>女<%/if%>
	  </td>
	  <td><%$info.content.day_of_birth%>
	  </td>
	  <td><%$info.content.region%>
	  </td>
	  <td>
            <a href="/users/contribution?userid=<%$info.author_id%>"><%$info.author_name%></a>
	  </td>
	  <td><%$info.ts_created%>
	  </td>
	  <td>
            <!-- <button history_id="<%$info.id%>" user_id="<%$user.id%>">恢复此版本 -->
            <!-- </button> -->
            <a href="/users/baseinfo_restore?userid=<%$user.id%>&historyid=<%$info.id%>">恢复到此版本</a>
	  </td>
	</tr>
	<%/foreach%>
	<tr>
	  <td colspan="8">
	    <%$page%>
	  </td>
	</tr>
      </table>
      <%else%>
      <span class="warnning">
	没有历史记录！
      </span>
      <%/if%>
    </div>
    <div class="clear">
    </div>
  </div>
</div>
<%include file="include/bottom.html"%>
